package com.haibara.codesubmiteval.model.vo;

import cn.hutool.core.bean.BeanUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.haibara.codesubmiteval.model.entity.QuestionSubmit;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: mengyu
 * @Date: 2025/3/4
 */
@Data
public class Least5TimeSubmitVO implements Serializable {
    private String questionTitle;
    private String judgeResult;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Serial
    private static final long serialVersionUID = 1L;

    public static Least5TimeSubmitVO getLeast5TimeSubmitVOByQuestionSubmit(QuestionSubmit questionSubmit) {
        Least5TimeSubmitVO least5TimeSubmitVO = new Least5TimeSubmitVO();
        BeanUtil.copyProperties(questionSubmit, least5TimeSubmitVO);
        return least5TimeSubmitVO;
    }
}
